<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" th:href="@{/static/bootstrap/css/bootstrap.min.css}" >
    <link rel="stylesheet" th:href="@{/static/css/index.css}" />

    <style>
        .table-bordered > tbody > tr > td
        {
            border: white 0px solid;
        }

        .seting{
            margin-left: 100px;
        }
    </style>
</head>
<body style="background-color: #f1f4f9;">
    <!-- 头部文件 -->
    <div th:replace="hreader :: html"></div>

    <div class="row container center-block" style="height:100%;">
        <div class="col-lg-8 col-md-12 col-sm-12 col-xs-12" style="background-color: white;">

            <!-- 页头 -->
            <div class="page-header">
                <h2>
                    <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                    <span th:text="${TYPE}"></span>
                </h2>
            </div>
            <!-- 我的问题 论坛列表 -->
            <div th:if="${TYPE eq '我的问题'}">
                <div class="item" th:each="question : ${QUESTION_LIST}" >
                    <a title="ccdalao - 个人主页" href="#" target="_blank">
                        <img class="img-circle" uid="2329" pos="right" th:src="${question.user.face}" style="cursor: pointer;">
                    </a>
                    <div class="middle text">
                        <h4 class="title">
                            <a class="forum-name" href="#" th:text="'['+${question.tag}+']'"></a>
                            <a style="" class="thread-title" th:href="'/question/'+${question.id}" th:text="${question.title}"></a>

                        </h4>
                        <div class="meta" th:text="${question.user.nickName}+'&nbsp;&nbsp;·&nbsp;&nbsp;发表于 '+${T(com.bbs.utils.DateUtil).getCreateDate(question.createTime)}">
                        </div>
                        <div class="comment">
                            <span class="badge badge-success" th:text="${question.commentCount}"></span>
                        </div>
                    </div>

                </div>
                <!-- 分页 -->
                <nav aria-label="Page navigation">
                    <ul class="pagination">
                        <li>
                            <a href="/people/page?page=0" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                        <li><a th:href="'/people/myQuestion?page='+${pStat.index +1}" th:each="page,pStat : ${PAGE_LIST}" th:text="${pStat.index} +1"></a></li>
                        <li>
                            <a th:href="'/people/myQuestion?page='+${PAGE_LIST.size()}" aria-label="Next">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
            <!-- 我的通知 -->
            <div th:if="${TYPE eq '我的通知'}">

                <ul style="list-style: none;padding:0px;">
                    <li class="thumbnail" th:each="notiction : ${NOTIFICTION_LIST}">
                        <span th:class="${notiction.status == 0 ? 'label label-danger pull-right' : 'label label-success pull-right'}" th:text="${notiction.status == 0 ? '未读' : '已读'}"></span>
                        <a href="#" th:text="${notiction.notifier.nickName}"></a>
                        <span class="text-muted" th:text="${notiction.type == 0 ? '评论了你的问题' : '回复了你的评论'}"></span>
                        <a th:href="'/read/'+${notiction.id}+'/'+${notiction.comment.questionId}+'?commentId='+${notiction.comment.id}" th:if="${notiction.comment != null}" th:utext="${notiction.comment.content}"></a>
                        <a th:href="'/read/'+${notiction.id}+'/'+${notiction.question.id}" th:if="${notiction.question != null}" th:text="${notiction.question.title}"></a>
                        <hr />
                    </li>
                </ul>

            </div>

            <!-- 我的资料 -->
            <div th:if="${TYPE eq '我的资料'}">

                <div style="height: 80px;">

                    <img style="width: 70px; height: 70px;" class="img-thumbnail" th:src="${session.USER.face}"/>

                    <span class="seting text-primary" th:text="${'用户名:'+session.USER.accountId}"></span>
                    <br/><span class="seting text-primary" th:text="'加入于 '+${session.USER.regTime}"></span>
                </div>

                <div class="page-header">
                    <h3>昵称<small class="seting" th:text="${session.USER.nickName}"></small></h3>
                </div>

                <div class="page-header">
                    <h3>性别<small class="seting" th:text="${session.USER.sex}"></small></h3>
                </div>
                <div class="page-header">
                    <h3>邮箱<small class="seting" th:text="${session.USER.email}"></small></h3>
                </div>
                <div class="page-header">
                    <h3>mobile<small class="seting" th:text="${session.USER.mobile}"></small></h3>
                </div>

            </div>
        </div>

        <div class="col-md-3 visible-lg-block col-md-offset-1" style="background-color: white;margin-left: 10px;">
            <div class="page-header">
                <h5>
                    <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                    快捷菜单
                </h5>
            </div>

            <div class="list-group">
                <a href="/people/myQuestion" class="list-group-item" th:classappend="${TYPE eq '我的问题'} ? 'active' : '' ">
                    <span class="glyphicon glyphicon-book" aria-hidden="true"></span>
                    我的问题
                </a>
                <a href="/people/mine" class="list-group-item" th:classappend="${TYPE eq '我的资料'} ? 'active' : '' ">
                    <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                    我的资料
                </a>
                <a href="/people/notifiction" class="list-group-item" th:classappend="${TYPE eq '我的通知'} ? 'active' : '' ">
                    <span class="glyphicon glyphicon-cloud" aria-hidden="true"></span>
                    我的通知<span class="badge pull-right" th:text="${NOTIFI_COUNT}"></span>
                </a>
            </div>

        </div>
    </div>
    <script th:src="@{/static/bootstrap/js/jquery.js}" ></script>
    <script src="/static/bootstrap/js/bootstrap.min.js" ></script>
    <div th:replace="fonter :: html"></div>
</body>
</html>
